
#ifndef DEMOCONTRASTANDBRIGHTNESSWIDGET_H
#define DEMOCONTRASTANDBRIGHTNESSWIDGET_H

#include <QWidget>
#include "common.h"

namespace Ui {
class DemoContrastAndBrightnessWidget;
}

class DemoContrastAndBrightnessWidget : public QWidget
{
    Q_OBJECT

public:
    explicit DemoContrastAndBrightnessWidget(QWidget *parent = 0);
    ~DemoContrastAndBrightnessWidget();

public:
    void setFilePath(QString filePath);

protected:
    void updateInfo();
    void updateImage();

private slots:
    void on_pushButton_openFile_clicked();
    void on_horizontalSlider_beta_sliderMoved(int position);
    void on_horizontalSlider_alpha_sliderMoved(int position);
    void on_pushButton_broswer_clicked();
    void on_spinBox_beta_valueChanged(int arg1);
    void on_doubleSpinBox_alpha_valueChanged(double arg1);
    void on_pushButton_showFile_clicked();
    void on_pushButton_backgroundColor_clicked();

private:
    Ui::DemoContrastAndBrightnessWidget *ui;

private:
    QString _filePath;

    cv::Mat _srcMat;
    QImage _srcImage;
    cv::Mat _dstMat;
    QImage _dstImage;
};
#endif // DEMOCONTRASTANDBRIGHTNESSWIDGET_H

